package com.tx.websocket.demo.dao;

import java.util.List;


import com.tx.websocket.demo.common.OffsetBean;
import com.tx.websocket.demo.model.Role;
import com.tx.websocket.demo.model.RoleResourceRel;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;


@Mapper
public interface RoleDao {

    Integer addRole(Role role);

    List<Role> listRole(@Param("role") Role role, @Param("offsetBean") OffsetBean offsetBean);

    Role getRoleByPrimaryKey(@Param("id") Long id);

    Integer delRoleByPrimaryKey(@Param("id") Long id);

    Integer updateRole(Role role);

    List<Role> listRoleByUserId(Long userId);

    Integer totalRole(@Param("role") Role role);

    Integer delRoleResRel(Long roleId);

    Integer insertRoleRes(List<RoleResourceRel> roleResourceRels);
}
